

if __name__ == '__main__':
    # 用户表 id,name
    # 订单表 orderId,userId,createTime,type,count
    """
    
    select u.`name` `name`,t.userId userId, t.year year,t.month month,t.totalCount totalCount from user u 
        left join 
        (
            select userId,YEAR(create_time) year,Month(create_time) month, SUM(`count`) totalCount from order group by userId,YEAR(create_time),Month(create_time)
        ) t
        on u.id=t.userId        
        
    class UserOrderInfo{
        name,
        year,
        month,
        totalCount
    }
    List<UserOrderInfo> list=new ArrayList<>();
    list.add(new UserOrderInfo());//添加100次
    List<UserOrderInfo> newList=new ArrayList<>();
    while(true){
        newList.addAll(list);
    }
    """